<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title><?php echo ($coursename); ?></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
		<script type="text/javascript" src="__JS__/menu.js"></script>
		<script type="text/javascript" src="__JS__/leftmenubar.js"></script>
		<link rel="stylesheet" href="__JS__/kindeditor/themes/default/default.css" />
		<link rel="stylesheet" href="__JS__/kindeditor/plugins/code/prettify.css" />
		<script charset="utf-8" src="__JS__/kindeditor/kindeditor.js"></script>
		<script charset="utf-8" src="__JS__/kindeditor/lang/zh_CN.js"></script>
		<script charset="utf-8" src="__JS__/kindeditor/plugins/code/prettify.js"></script> 
		<script>
			KindEditor.ready(function(K) {
				var editor1 = K.create('textarea[name="text"]', {
					cssPath : '__JS__/kindeditor/plugins/code/prettify.css',
					uploadJson : '__JS__/kindeditor/php/upload_json.php?no=<?php echo ($no); ?>',
					fileManagerJson : '__JS__/kindeditor/php/file_manager_json.php?no=<?php echo ($no); ?>',
					allowFileManager : true,
					afterCreate : function() {
						var self = this;
						K.ctrl(document, 13, function() {
							self.sync();
							K('form[name=discuss]')[0].submit();
						});
						K.ctrl(self.edit.doc, 13, function() {
							self.sync();
							K('form[name=discuss]')[0].submit();
						});
					}
				});
				prettyPrint();
			});
		</script>
		<script type="text/javascript" src="__JS__/jshelper.js"></script> 
		<script type="text/JavaScript">
			function discussdelete(id,courseid){
				if (confirm("你确定要删除吗")==true) {
					//posthelper([["id",id],],'__URL__/discussdelete');
					postwith('__URL__/discussdelete',{id:id,courseid:courseid});
				}
			}
		
					window.onload=show;
		
		</script>
		<script type="text/javascript" src="__JS__/jQuery/jquery.js"></script>
       	<script type="text/javascript" src="__JS__/jQuery/jquery.form.js"></script>
		<script type="text/JavaScript">
        $(function(){
            $('#form1').ajaxForm({
                //beforeSubmit:  function(){alert("before");},  // pre-submit callback
                success:       complete,  // post-submit callback
                error:function(){alert("error");},
                dataType: 'json'
            });
            
            function complete(data){
                if (data.status==1)
                {
                	window.location=window.location.href;
                }else{
                    $('#result').html(data.info).show();
                }
            }
        });
        </script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>课程展示</title>
</head>
<body>
<!-- layout::Auth:header::0 -->
 <div class="container-fluid">
    <div class="row-fluid">
      <!-- layout::Auth:Courseleftmenu::0 -->
		<div class="span8">
          <div class="hero-unit">
          	<h3><?php echo ($coursename); ?>课程展示</h3>
            <p style="font-size:12px"> 当前位置：
                <a href='__APP__/index/index' class="nowpositionhref">主页</a>>
                <a href='__URL__/index' class="nowpositionhref">院系展示</a>>
                <a href='__URL__/custom1/id/<?php echo ($departmentid); ?>' class="nowpositionhref"><?php echo ($dname); ?></a>>
                <a href='__URL__/department/id/<?php echo ($courseid); ?>' class="nowpositionhref">课程展示</a>>
                <a href='__URL__/course/id/<?php echo ($courseid); ?>' class="nowpositionhref"><?php echo ($coursename); ?></a>
			</p>
           </div>
          		
            <div class="hero-unit">
             <form id="form2" method="post">
                                    <th>
                                    <?php if($b == 1): ?><input type='hidden' name='id' value =<?php echo ($a["id"]); ?>>
                                        <input type='hidden' name='courseid' value='<?php echo ($courseid); ?>'>
                                        <input   type= "button"   name= "btn1 " class="btn btn-warning"   value= "主页修改 "   onclick= "subform('__APP__/user/customedit'); ">
                                        <input   type= "button"   name= "btn2 "  class="btn btn-danger"  value= "主页删除 "   onclick= "subform('__APP__/user/customdelete'); "><?php endif; ?>
                                    </th>
                                
                                </form>
                <?php if(is_array($a)): $i = 0; $__LIST__ = $a;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><table style="width:100%; text-align:center">
                        <tr>
                            <td style="text-align:center; width:100%;"><h2><?php echo ($vo["topic"]); ?></h2></td>
                        </tr>
                      </table>
                      <hr style="width:100%" />
                        <table>
                            <tr>
                                <td class="span4">
                                    作者：<?php echo ($vo["nname"]); ?>
                                </td>
                                <td class="span6">
                                    发布时间：<?php echo ($vo["time"]); ?>
                                </td>
                                <td class="span2">
                                    浏览次数：<?php echo ($vo["pv"]); ?>
                                </td>
                            </tr>
                        </table>
                        <br/><br/>
                        <table>
                            <tr>
                                <td style="width:80%"" ><?php echo ($vo["text"]); ?></td>
                            </tr>
                        </table><?php endforeach; endif; else: echo "" ;endif; ?>
                </div>
               </div>
              </div>
             </div>
			<p  class="navbar-text pull-right"><?php echo ($page); ?></p>
</body>
</html>